import request from "../utils/request.ts";
import {LoginFieldType} from "../types/user.ts";

export const login = async (data: LoginFieldType) => request<{ token: string }>({
    url: '/api/auth/login',
    method: 'post',
    data
})

export const register = async (data: LoginFieldType) => request<{ token: string }>({
    url: '/api/auth/register',
    method: 'post',
    data
})